package org.example.petitionplatformsystem.controller;

import org.example.petitionplatformsystem.Response;
import org.example.petitionplatformsystem.dao.model.*;

import org.example.petitionplatformsystem.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class test {
    private final UsersService usersService;
    private final DepartmentsService departmentsService;
    private final AuthenticationService authenticationService;
    private final InstitutionService institutionService;
    private final EmployeesService employeesService;
    private final CategoryService categoryService;
    private final NewsService newsService;
    private final ImagesService imagesService;
    private final SalesmanOperationLogService salesmanOperationLogService;
    private final PetitionEventsService petitionEventsService;
    private final ComplaintStatusService complaintStatusService;
    private final DelayRequestsService delayRequestsService;
    private final ApprovalsService approvalsService;
    private final LeaderMailboxService leaderMailboxService;
    private final DuplicateAndFilterService duplicateAndFilterService;
    private final ProcessResultsService processResultsService;
    private final OnlineHelpGuidanceService onlineHelpGuidanceService;
    private final KnowledgeBaseService knowledgeBaseService;

    @Autowired
    public test(UsersService usersService,
                DepartmentsService departmentsService,
                AuthenticationService authenticationService,
                InstitutionService institutionService,
                EmployeesService employeesService,
                CategoryService categoryService,
                NewsService newsService,
                ImagesService imagesService,
                SalesmanOperationLogService salesmanOperationLogService,
                PetitionEventsService petitionEventsService,
                ComplaintStatusService complaintStatusService,
                DelayRequestsService delayRequestsService,
                ApprovalsService approvalsService,
                LeaderMailboxService leaderMailboxService,
                DuplicateAndFilterService duplicateAndFilterService,
                ProcessResultsService processResultsService,
                OnlineHelpGuidanceService onlineHelpGuidanceService,
                KnowledgeBaseService knowledgeBaseService){
        this.usersService = usersService;
        this.departmentsService = departmentsService;
        this.authenticationService = authenticationService;
        this. institutionService = institutionService;
        this. employeesService = employeesService;
        this. categoryService = categoryService;
        this. newsService = newsService;
        this. imagesService = imagesService;
        this. salesmanOperationLogService = salesmanOperationLogService;
        this. petitionEventsService = petitionEventsService;
        this. complaintStatusService = complaintStatusService;
        this. delayRequestsService = delayRequestsService;
        this. approvalsService = approvalsService;
        this. leaderMailboxService = leaderMailboxService;
        this. duplicateAndFilterService = duplicateAndFilterService;
        this. processResultsService = processResultsService;
        this. onlineHelpGuidanceService = onlineHelpGuidanceService;
        this. knowledgeBaseService = knowledgeBaseService;
    }




    @GetMapping("/user")
    public Response<Users> getUsers(){
        return Response.newSuccessResponse(usersService.GetUsersById(10000000));
    }

    @GetMapping("/department")
    public List<Departments> getdepartment(){
        return departmentsService.GetAllDepartments();
    }

    @GetMapping("/auth")
    public Response<List<Authentication>> getAuth(){
        return Response.newSuccessResponse(authenticationService.GetAllAuthentication());
    }

    @GetMapping("/Institution")
    public Institution getInstitution(){
        return institutionService.getInstitutionById(1L);
    }

    @GetMapping("/Employees")
    public Employees getEmployees(){
        return employeesService.getEmployeeById(10000L);
    }

    @GetMapping("/Category")
    public Category getCategory(){
        return categoryService.getCategoryById(1L);
    }

    @GetMapping("/News")
    public List<News> getNews(){
        return newsService.getAllNews();
    }

    @GetMapping("/Images")
    public List<Images> getImages(){
        return imagesService.getAllImages();
    }

    @GetMapping("/SalesmanOperationLog")
    public List<SalesmanOperationLog> getSalesmanOperationLog(){
        return salesmanOperationLogService.GetAllSalesmanOperationLog();
    }

    @GetMapping("/PetitionEvents")
    public List<PetitionEvents> getPetitionEvents(){
        return petitionEventsService.getAllPetitionEvents();
    }

    @GetMapping("/ComplaintStatus")
    public List<ComplaintStatus> getComplaintStatus(){
        return complaintStatusService.getAllComplaintStatuses();
    }

    @GetMapping("/DelayRequests")
    public List<DelayRequests> getDelayRequests(){

        return delayRequestsService.getAllDelayRequests();
    }

    @GetMapping("/Approvals")
    public List<Approvals> getApprovals(){

        return approvalsService.getAllApprovals();
    }


    @GetMapping("/LeaderMailbox")
    public List<LeaderMailbox> getLeaderMailbox(){

        return leaderMailboxService.getAllLeaderMailboxes();
    }

    @GetMapping("/DuplicateAndFilter")
    public List<DuplicateAndFilter> getDuplicateAndFilter(){

        return duplicateAndFilterService.getAllDuplicateAndFilters();
    }

    @GetMapping("/ProcessResults")
    public List<ProcessResults> getProcessResults(){

        return processResultsService.getAllProcessResults();
    }

    @GetMapping("/OnlineHelpGuidance")
    public List<OnlineHelpGuidance> getOnlineHelpGuidance(){

        return onlineHelpGuidanceService.getAllOnlineHelpGuidances();
    }

    @GetMapping("/KnowledgeBase")
    public List<KnowledgeBase> getKnowledgeBase(){

        return knowledgeBaseService.getAllKnowledgeBases();
    }

}
